<%@page import="com.example.labyrinth.LabyrinthRow"%>
<%@page import="java.util.List"%>
<%@page import="com.example.labyrinth.DatabaseHelper"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Labyrinths in Database</title>
</head>
<body>







	<table border="1">
		<tr>
			<th>Id</th>
			<th>maze</th>
			<th></th>
		</tr>

		<%
		    List<LabyrinthRow> labyrinthRows = DatabaseHelper.getAllLabyrinhts();

		    for (LabyrinthRow labyrinthRow: labyrinthRows) {
		%>

		<tr>
			<td><%=labyrinthRow.id%></td>
			<td><pre><%=labyrinthRow.labyrinthString%></pre></td>

			<td>
				<form name="myform" action="FinishedLabyrinth.jsp" method="POST">
					<input type="hidden" value="<%=labyrinthRow.labyrinthString%>" name="originalLabyrinth" /> 
					<input type="submit"
						value="Senden">
				</form>
			</td>

		</tr>

		<%
		    }
		%>



	</table>


</body>
</html>